<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@ include file="/WEB-INF/views/common/taglibs.jsp" %>
<html>
<!-- BEGIN HEAD -->
<head>
    <title>用户编辑界面</title>
</head>
<body>
    <!-- BEGIN PAGE CONTENT LIST-->
    <div>
        <form id="form_user" action="#" role="form">
            <input type="hidden" name="id" value="${user.id}"/>
            <input type="hidden" id="appId" name="appId" value="${user.appId}"/>
            <div class="form-group">
                <label>登录名<span class="label-required">*</span></label>
                <input type="text" name="loginName" class="form-control" value="${user.loginName}"/>
            </div>
            <div class="form-group">
                <label>用户名<span class="label-required">*</span></label>
                <input type="text" name="userName" class="form-control" value="${user.userName}"/>
            </div>
            <div class="form-group">
                <label>密码</label>
                <input type="password"  class="form-control" name="pazzword">
            </div>
            <div class="form-group">
                <label>角色<span class="label-required">*</span></label>
                <div>
                    <c:forEach var="item" items="${roleList}" varStatus="s">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" name="roles" value="${item.id}"
                                        <c:forEach items="${user.sysUserRoleRelationList}" var="tmp">
                                            <c:if test="${tmp.roleId == item.id }">
                                                checked
                                            </c:if>
                                        </c:forEach>
                                />${item.roleName}
                            </label>
                        </div>
                    </c:forEach>
                        <%--<div class="checkbox">
                            <label>
                                <input type="checkbox" name="languages" value="english" data-bv-message="Please specify at least one language you can speak" /> English
                            </label>
                        </div>
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" name="languages" value="french" /> French1
                            </label>
                        </div>--%>
                </div>
            </div>
            <div class="form-group">
                <label>APP数据授权</label>
                <div id="div_role_authorize">
                </div>
            </div>
            <div class="form-group">
                <button id="btn_user_save" type="submit" class="btn btn-success">保存</button>
                <button id="btn_user_back" type="button" class="btn">返回</button>
            </div>
        </form>
    </div>
<!-- END PAGE CONTAINER-->
</body>
</html>